<template>
	<view>
		<web-view :src="liveUrl" v-if="liveUrl.length"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				liveUrl: "",
				info: {},
				userId: ""
			}
		},
		onLoad(option) {
			uni.getStorage({
				key: "userInfo",
				success: (userInfo) => {
					this.userId = userInfo.data.id;
					this.$request.get(this.$api.liveDetail, {
						id: option.id,
						userId: this.userId
					}).then(res => {
						this.info = res.result;
						this.liveUrl = this.info.liveLink;
						uni.hideLoading()
					})
				}
			})
		},
		methods: {

		}
	}
</script>

<style>

</style>
